import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('views/Home.vue'),
    children:[
      {path:'/',component: () => import('components/HomePage.vue')},
      {path:'/About',component: () => import('views/About.vue')},
      {path:'/Rules',component: () => import('views/Rules.vue')},
      {path:'/NiceBuy',component: () => import('components/NiceBuy.vue')},
      {path:'/Goods',component: () => import('components/Goods.vue')},
      {path:'/SaleDone',component: () => import('components/SaleDone.vue')},
      {path:'/Cart',component: () => import('components/Cart.vue')},
      {path:'/Myorder',component: () => import('components/Order.vue')},
      {path:'/postList',component: () => import('components/postList.vue')},
      {path:'/orderList',component: () => import('components/changeList.vue')},
      {path:'/product',component: () => import('components/product.vue')},
      {path:'/message',component: () => import('components/message.vue')},
      
    ]
  },
  { path: '/Regist',component: () => import('views/Regist.vue')},

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
